<?php $posts = $this->getPosts(); ?>
       <div class="newsevents">
         <div class="bg_top_y"><img src="<?php echo $this->getSkinUrl()?>images/contact_bg_top.gif"/></div>
         <div class="main">
            <div class="title_event">
                <div class="border1"><img src="<?php echo $this->getSkinUrl()?>images/border1.png"/></div>
                <div class="title_c">
                   <span>DOWNLOADS</span>
                   <div class="select"><p class="downloads_inf">Click on any item to download</p></div>
                </div>
                <div class="border1"><img src="<?php echo $this->getSkinUrl()?>images/border1.png"/></div>
            </div>
            <?php $i=1; foreach ($posts as $post):?>
           <div class="car_list">
                <div class="border1"><img src="<?php echo $this->getSkinUrl()?>images/border1.png"/></div>
                 <div id="downloadsexpand<?php echo $i?>" class="cars">
                    <h3 > <strong class="tt"><?php echo $post->getTitle()?></strong> 
                    <span style="overflow: visible;"  class="click">
                    <img class="question" src="<?php echo $this->getSkinUrl()?>images/question.png" alt="" width="17" height="17" />
                    Click to expand this article<a style="" href="javascript:clickShowIcon('<?php echo $i?>');">  
                    <img class="sword" src="<?php echo $this->getSkinUrl()?>images/sworddown.png" alt="" width="31" height="31" /></a></span></h3>
                 </div>
				  <div id="downloadsdetail<?php echo $i?>" style="display:none" class="hide_detail">
                   <div  class="news"  style="display:block">
                   		<p>
                   		<?php 
                   		if ($post->getLinkUrl()){
                   			echo $post->getLinkUrl();
                   		}else{
                   			echo $post->getTitle();
                   		}
                   		?>
                   		</p>
						<p><?php echo $post->getPostContent()?></p>
                    <div  class="closebar" id="newsclosebar<?php echo $i?>">
                       <div class="border1"><img src="<?php echo $this->getSkinUrl()?>images/border2.png"/></div>
                       <div class="closebar_c">
                           <div class="infor">
                                <table  cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td><img src="<?php echo $this->getSkinUrl()?>images/mark1.png"/></td>
                                    <td>0 mentions</td>
                                    <td><img src="<?php echo $this->getSkinUrl()?>images/retweet.jpg"/></td>
                                    <td><img src="<?php echo $this->getSkinUrl()?>images/like.jpg"/></td>
                                    <th>0</th>
                                  </tr>
                                </table>
                           </div>
                           <span style="overflow: visible;"  class="click">
                           <img class="question" src="<?php echo $this->getSkinUrl()?>images/question.png" alt="" width="17" height="17" />
                           Click to close this article<a style="" href="javascript:clickShowIcon('<?php echo $i?>');">  
                           <img class="sword marginleft1" src="<?php echo $this->getSkinUrl()?>images/swordup.png" alt="" width="31" height="31" /></a></span>
                       </div>
                       <div class="border1"><img src="<?php echo $this->getSkinUrl()?>images/border2.png"/></div>
                    </div>
                   </div>
                 </div>
                <div class="border1"><img src="<?php echo $this->getSkinUrl()?>images/border1.png"/></div>
            </div>
			<?php $i++; endforeach;?>
         </div>
         <div class="bg_bottom_y"><img src="<?php echo $this->getSkinUrl()?>images/contact_bg_bottom.gif"/></div>
</div>
  <script type="text/javascript">

<!--

function clickShowIcon(id){
	
/*		for(i=1; i<=3;i++) {
			    document.getElementById("menu"+i).style.backgroundImage  = "url(http://energy.kaltesting.co.uk/skin/frontend/default/energy/images/a_2_bg.jpg)";
			    document.getElementById("menu"+i).style.backgroundRepeat = "no-repeat";
			    document.getElementById("menu"+i).style.backgroundPosition  = "0 25px";
				document.getElementById("menu"+i).style.color ="#8B8B8B";
				
				}

			    document.getElementById("menu"+id).style.backgroundRepeat = "no-repeat";
			    document.getElementById("menu"+id).style.backgroundPosition  = "0 0";
	if(id == ) {
		    document.getElementById("menu"+id).style.backgroundImage  = "url(http://energy.kaltesting.co.uk/skin/frontend/default/energy/images/a_1_bg.jpg)";
			  document.getElementById("menu"+id).style.color = "#fff";
			 }
	   else {document.getElementById("menu"+id).style.backgroundImage  = "url(http://energy.kaltesting.co.uk/skin/frontend/default/energy/images/a_2_bg.jpg)";document.getElementById("menu"+id).style.color = "#fff";}
*/

	new Effect.toggle('downloadsdetail'+id,'slide',{duration:0.7});
	new Effect.toggle('downloadsexpand'+id,'slide',{duration:0.7});
	new Effect.toggle('downloadsclosebar'+id,'slide',{duration:0.7});

	//new Element.toggle('downloadsdetail'+id);
	//new Element.toggle('downloadsexpand'+id);
	//new Element.toggle('downloadsclosebar'+id);

	if(document.getElementById('toplink'+id).className==''){

		document.getElementById('toplink'+id).className='current';

		var i=2;

		while(i<=4){

			if(i!=id){

				if(document.getElementById('downloadsexpand'+i).style.display=='none'){

					document.getElementById('toplink'+i).className='';

					new Effect.toggle ('downloadsdetail'+i,'slide',{duration:0.3});
					new Effect.toggle ('downloadsexpand'+i,'slide',{duration:0.3});
					new Effect.toggle ('downloadsclosebar'+i,'slide',{duration:0.3});

					//new Element.toggle('downloadsdetail'+i);
					//new Element.toggle('downloadsexpand'+i);
					//new Element.toggle('downloadsclosebar'+i);

				}

			}

			i++;

		}

		

	}else{

		document.getElementById('toplink'+id).className='';

	}

}



function winpop(memid) { 

  //window.open("view_images.php?model=&gid="+memid,"_blank","menubar=1,resizable=1,scrollbars=1,width=750,height=800"); 

} 



function capturepop(brochure) { 

  //window.open("/customer/main/capture_pdf.php?id="+brochure,"_blank","width=300,height=350,scrollbars=1"); 

} 



-->

</script>